

mod lexer;

fn main() {
    use std::env;
    use std::fs;

    let mut args = env::args();
    let _program = args.next();
    let filename = match args.next() {
        Some(f) => f,
        None => {
            eprintln!("Usage: cargo run -- <source-file>");
            return;
        }
    };

    let source = fs::read_to_string(&filename).expect("Cannot read file");

    lexer::run_lexer(&source);
}

